USE
DR2='N:'
F10='REVENUE2'
F20='ACTIVIT2'
F22='ACTITYP2'
F30='ACT_PRO2'
F31='ACT_RPAT'
F40='ACT_PHA2'
F41='ACT_HPAT'
F50='DOCT_FE2'
F110='REVDAT2X'
F120='REVNAM2X'
F121='REVCASH'
F10A='REVENUE2.DBF'
F20A='ACTIVIT2.DBF'
F30A='ACT_PRO2.DBF'
F40A='ACT_PHA2.DBF'
F50A='DOCT_FE2.DBF'
DO SIGNIT
if file("&dr2&f10A")
   IF NET_USE("&DR2&F10",.T.,'1',10)
      DO SIGNI
      INDE ON PAT_FILCOD+DTOS(DATE_VISIT)+INV_NBER TO &DR2&F10
      DO SIGNI
      INDE ON DTOS(DATE_VISIT)+INV_NBER TO &DR2&F110
      DO SIGNI
      INDE ON PAT_NAME+PAT_F_NAME+DTOS(DATE_VISIT)+INV_NBER TO &DR2&F120
      DO SIGNI
      INDE ON CASH_NAME+DTOC(DATE_VISIT) TO &DR2&F121
   ENDIF
ENDIF
USE
if file("&dr2&f20A")
   IF NET_USE("&DR2&F20",.T.,'1',10)
      DO SIGNI
      INDE ON DTOS(DATE_VISIT)+INV_NBER TO &DR2&F20
      DO SIGNI
      INDE ON PAT_CODTYP+DTOS(DATE_VISIT)+INV_NBER TO &DR2&F22
   ENDIF
ENDIF
USE
if file("&dr2&f30A")
   IF NET_USE("&DR2&F30",.T.,'1',10)
      DO SIGNI
      INDE ON DTOS(DATE_VISIT)+INV_NBER TO &DR2&F30
      DO SIGNI
      INDE ON INV_NBER TO &DR1&F31
   ENDIF
ENDIF
USE
if file("&dr2&f40A")
   IF NET_USE("&DR2&F40",.T.,'1',10)
      DO SIGNI
      INDE ON DTOS(DATE_VISIT)+INV_NBER TO &DR2&F40
      DO SIGNI
      INDE ON INV_NBER TO &DR1&F41
   ENDIF
ENDIF
USE
If file("&dr2&f50A")
   IF NET_USE("&DR2&F50",.T.,'1',10)
      DO SIGNI
      INDE ON DOC_CODE+DTOS(DATE_VISIT)+INV_NBER TO &DR2&F50
   ENDIF
ENDIF
clos all
RETURN

